package model

import "go-stage/micro/pb"

type DictModel struct {
	Id         int64  `db:"id"`
	Uuid       string `db:"uuid"`
	Describe   string `db:"describe"`
	Context    string `db:"context"`
	Value      string `db:"value"`
	ParentUuid string `db:"parent_uuid"`
	GroupUuid  string `db:"group_uuid"`
	CreateTime int64  `db:"create_time"`
	UpdateTime int64  `db:"update_time"`
	Status     int32  `db:"status"`
}

func (dictModel *DictModel) ToPB() *pb.DictModel {
	return &pb.DictModel{
		Id:         dictModel.Id,
		Uuid:       dictModel.Uuid,
		Describe:   dictModel.Describe,
		Context:    dictModel.Context,
		Value:      dictModel.Value,
		ParentUuid: dictModel.ParentUuid,
		GroupUuid:  dictModel.GroupUuid,
		CreateTime: dictModel.CreateTime,
		UpdateTime: dictModel.UpdateTime,
		Status:     dictModel.Status,
	}
}
